﻿<?php
	require_once('template/template1.phtml');
	require_once('left_xuly.php');
?>	

	<div class="right">
		<div class="title_step">
			<ul><li class="active"><div><span>Sản phẩm <?php echo $ten_loai;?></span></div></li></ul>
		</div>						
		<div class="wapper_sp_content">
		<?php 	
			$i = 0;
			foreach($sp_loai as $value){
			
				echo "<div class='wapper_sp_1'>";
				echo 	"<div class='wapper_sp_1_title'>";
				echo		"<a href='".$config_basedir ."/sp.php?id={$value['id']}'>{$value['ten_sp']}) </a>";
				echo	"</div>";
				echo	"<div class='wapper_sp_1_img'>";
				echo 		"<a href='".$config_basedir ."/sp.php?id={$value['id']}'> <img src='{$value['img_url']}' width='100' height='80' /></a>";
				echo	"</div>";
				echo	"<div class='wapper_sp_1_price'>";
				echo 		"<strong>Giá: <span class='color_red'>{$value['gia']}</span></strong>";
				echo	"</div>";
				echo	"<div class='wapper_sp_1_iconcart'>";
				echo		"<div class='wapper_sp_1_cart'>";
				echo			"<div class='wapper_sp_1_cart_text'>";
				echo				"<a href='".$config_basedir ."/buy.php?id={$value['id']}'>Đặt hàng</a>";
				echo			"</div>";
				echo		"</div>";
				echo		"<div class='wapper_sp_1_details'>";
				echo			"<div class='wapper_sp_1_details_text'>";
				echo				"<a href='".$config_basedir ."/sp.php?id={$value['id']}'>Chi tiết»</a>";
				echo			"</div>";
				echo		"</div>";
				echo	"</div>";
				echo "</div>";

				if ( (++$i % 4) == 0)
					echo "<div class='cb'></div>";
			}
		?>	
			
		</div>
	</div>
	
<?php	
	require_once('template/template2.phtml');
?>